<?php

namespace App\Admin\Http\Requests;


class OrganizationalUserRequest extends Request
{
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'company_name'          => 'required|max:90',           //公司名称
            'address'               => 'required|max:90',           //企业地址
            'license_no'            => 'required|max:50',           //执照号
            'license_address'       => 'required|max:50',           //营业执照所在地
            'license_expire_date'   => 'required|max:10',           //执照过期日
            'business_scope'        => 'required|max:256',          //营业范围
            'telephone'             => 'required|max:20',           //联系电话
            'email'                 => 'required|max:50',           //联系email
            'organization_no'       => 'required|max:32',           //组织机构代码
            'summary'               => 'required|max:512',          //企业简介
            'legal_person'          => 'required|max:32',           //企业法人
            'cert_no'               => 'required|max:18',           //法人证件号码
            'legal_person_phone'    => 'required|max:20',           //法人手机号码
            'bank_code'             => 'required|max:10',           //银行编号
            'bank_account_no'       => 'required|max:19',           //银行卡号
            'province'              => 'required|max:128',          //开户行省份
            'city'                  => 'required|max:128',          //开户行城市
            'bank_branch'           => 'required|max:255',          //支行名称
            'yyzz'                  => 'required|max:4096|mimes:jpeg,bmp,png',          //营业执照
            'zzjgz'                 => 'required|max:4096|mimes:jpeg,bmp,png',         //组织机构代码证
            'swdjz'                 => 'required|max:4096|mimes:jpeg,bmp,png',         //税务登记证
            'jsxkz'                 => 'required|max:4096|mimes:jpeg,bmp,png',         //单位银行计算账户开户许可证
            'frzjz'                 => 'required|max:4096|mimes:jpeg,bmp,png',         //企业法人证件正面
            'frzjf'                 => 'required|max:4096|mimes:jpeg,bmp,png',         //企业法人证件反面
        ];
    }

    public function attributes()
    {
        return [
            'company_name'          => '公司名称',
            'address'               => '企业地址',
            'license_no'            => '执照号',
            'license_address'       => '营业执照所在地',
            'license_expire_date'   => '执照过期日',
            'business_scope'        => '营业范围',
            'telephone'             => '联系电话',
            'email'                 => '联系邮箱',
            'organization_no'       => '组织机构代码',
            'summary'               => '企业简介',
            'legal_person'          => '企业法人',
            'cert_no'               => '法人证件号码',
            'legal_person_phone'    => '法人手机号码',
            'bank_code'             => '银行编号',
            'bank_account_no'       => '银行卡号',
            'province'              => '开户行省份',
            'city'                  => '开户行城市',
            'bank_branch'           => '支行名称',
            'yyzz'                  => '营业执照',
            'zzjgz'                 => '组织机构代码证',
            'swdjz'                 => '税务登记证',
            'jsxkz'                 => '单位银行计算账户开户许可证',
            'frzjz'                 => '企业法人证件正面',
            'frzjf'                 => '企业法人证件反面',
        ];
    }
}